//
//  XLCollectionAdapter.h
//  campus
//
//  Created by xl on 2019/12/15.
//  Copyright © 2019 xl. All rights reserved.
//

#import <Foundation/Foundation.h>


@protocol XLCollectionAdapterDelegate <NSObject>

@optional
- (void)didSelectCellData:(id)cellData;
- (void)didSelectCellData:(id)cellData indexPath:(NSIndexPath *)indexPath;
- (void)deleteCellData:(id)cellData;
- (void)willDisplayCell:(UICollectionViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;

@end

@interface XLCollectionAdapter : NSObject<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout>

@property (nonatomic, weak) id<XLCollectionAdapterDelegate> adapterDelegate;

- (void)refreshCellByData:(id)data collectionView:(UICollectionView *)collectionView;

- (NSMutableArray*)getAdapterArray;

- (void)setAdapterArray:(NSArray*)arr;

@end


